 
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page isELIgnored="false" %>
<%@include file="../common/taglibs.jsp" %>

<%
	//获得项目完全路径（假设你的项目叫MyApp，那么获得到的地址就是 http://localhost:8080/MyApp/）:    
	String basePath4footcustomerlike = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();   
%>  
 		  
          
          <c:if test="${!empty page4customersLikes.data }">
          <hr>
          <h4>Customers Who Viewed This Product Also Viewed</h4>
          <c:set var="customersLikes_index" value="1"></c:set>
	      <c:forEach items="${page4customersLikes.data }" var="card">
	         <c:if test="${customersLikes_index%4==1 }">
	    		<div class="row">
	    	 </c:if>
          			<div class="col-md-3">
			              <a href="<%=basePath4footcustomerlike %>/product/${card.id}/productDetail" class="thumbnail">
			                <img src="<%=basePath4footcustomerlike %>/assets/images/product/${card.mainImgPath}"/>
			              </a>
			              <p class="text-center common">
			              <a href="<%=basePath4footcustomerlike %>/product/${card.id}/productDetail">${card.productName}</a>
			              </p>
			              <c:choose>
								<c:when test="${card.preSellPrice > card.actualSellPrice}">
									<font color="red">&nbsp;&nbsp;$${card.actualSellPrice }</font>&nbsp;&nbsp;&nbsp;&nbsp;<del>$${card.preSellPrice }</del>
								</c:when>
								<c:otherwise>
									<font color="red">&nbsp;&nbsp;$${card.actualSellPrice }</font>
								</c:otherwise>
			 		    </c:choose>
			              <div class="row">
			              		<p class="text-left col-md-6">&nbsp;&nbsp;<img src="<%=basePath4footcustomerlike %>/assets/images/product/common/IcoRating5.gif"/></p> 
								<p class="text-right col-md-6">
									<a href="javascript:addToCart(${card.id},1,${card.actualSellPrice });"><img src="<%=basePath4footcustomerlike %>/assets/icos/product/addToCart.jpg"/></a>
			             		</p>
			              </div>
             		</div>
               <c:choose>
	          		<c:when test="${customersLikes_index == page4customersLikes.pageSize}">
	          			</div><!--/row-->
	           			 <hr>
	          		</c:when>
	          		<c:when test="${customersLikes_index == fn:length(page4customersLikes.data)}">
	          			</div><!--/row-->
	           			 <hr>
	          		</c:when>
	          		<c:otherwise>
	          			<c:if test="${customersLikes_index%4==0 }">
				    	   </div><!--/row-->
				    	    <hr>
				    	 </c:if>
	          		</c:otherwise>
			  </c:choose> 
	          <c:set var="customersLikes_index" value="${customersLikes_index+1 }"></c:set>
	      </c:forEach>
          </c:if>